﻿Imports AccesoDatos

Public Class Combos

    Public Function CboTablas(ByVal pstrTabla As String) As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        Dim Parametros(,) As Object = {{"@TABLA", SqlDbType.VarChar, UCase(pstrTabla)}}
        dsConsultaDatos = objCom.ExecSPDataSetCP("SP_TABLAS", Parametros)
        Return dsConsultaDatos
    End Function


    Public Function CboPeriodo() As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        dsConsultaDatos = objCom.ExecSPDataSetSP("CBO_PERIODO")
        Return dsConsultaDatos
    End Function

    Public Function CboLocal() As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        dsConsultaDatos = objCom.ExecSPDataSetSP("CBO_LOCAL")
        Return dsConsultaDatos
    End Function

    Public Function CboAlmacen() As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        dsConsultaDatos = objCom.ExecSPDataSetSP("CBO_ALMACEN")
        Return dsConsultaDatos
    End Function

    Public Function CboSexo() As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        dsConsultaDatos = objCom.ExecSPDataSetSP("CBO_SEXO")
        Return dsConsultaDatos
    End Function

    Public Function CboDistrito(ByVal pstrDistrito As String) As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        Dim Parametros(,) As Object = {{"@DIST", SqlDbType.VarChar, UCase(pstrDistrito)}}
        dsConsultaDatos = objCom.ExecSPDataSetCP("CBO_DISTRITO", Parametros)
        Return dsConsultaDatos
    End Function

    Public Function CboAFP(ByVal pstrCODAFP As String) As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        Dim Parametros(,) As Object = {{"@CODIGO", SqlDbType.VarChar, UCase(pstrCODAFP)}}
        dsConsultaDatos = objCom.ExecSPDataSetCP("CBO_AFP", Parametros)
        Return dsConsultaDatos
    End Function

    '*******************************
    'VENTAS
    '*******************************
    Public Function CboMozo(ByVal pstrLocal As String) As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        Dim Parametros(,) As Object = {{"@LOCAL", SqlDbType.VarChar, UCase(pstrLocal)}}
        dsConsultaDatos = objCom.ExecSPDataSetCP("CBO_MOZO", Parametros)
        Return dsConsultaDatos
    End Function

    Public Function CboEmpleados() As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        dsConsultaDatos = objCom.ExecSPDataSetSP("SP_LISTA_EMPLEADOS")
        Return dsConsultaDatos
    End Function

    '*******************************
    'ALMACEN
    '*******************************
    Public Function CboGrupo() As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        dsConsultaDatos = objCom.ExecSPDataSetSP("CBO_GRUPO")
        Return dsConsultaDatos
    End Function

    '*******************************
    'COMPRAS
    '*******************************

    Public Function CboProveedor() As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        dsConsultaDatos = objCom.ExecSPDataSetSP("CBO_PROVEEDOR")
        Return dsConsultaDatos
    End Function

    Public Function CboItem() As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        dsConsultaDatos = objCom.ExecSPDataSetSP("CBO_ITEM")
        Return dsConsultaDatos
    End Function

    Public Function CboUnidad() As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        dsConsultaDatos = objCom.ExecSPDataSetSP("CBO_UNIDAD")
        Return dsConsultaDatos
    End Function

    Public Function CboInsumo() As DataSet
        Dim dsConsultaDatos As DataSet
        Dim objCom As New BaseDatos
        dsConsultaDatos = objCom.ExecSPDataSetSP("CBO_INSUMO")
        Return dsConsultaDatos
    End Function
End Class
